package ru.nsu.fit.iconveyor.conveyor.storage;

/**
 * @author Timur Zolotuhin (tzolotuhin@gmail.com)
 */
public class Utils {
    public final static String DEF_NODE_KEY = "node_key_";

    public static String generateKeyForNodeAttribute(String nodeId, String parameterName) {
        //return "node_key_" + nodeId + "_" + parameterName;
        return parameterName;
    }

    public static String getAttributeNameForNodeFromKey(String key, String nodeId) {
        //if (key.startsWith(DEF_NODE_KEY)) {
        //    String nodeIdAndAttributeName = key.substring(DEF_NODE_KEY.length());
        //    if (nodeIdAndAttributeName.startsWith(nodeId + "_")) {
        //        return nodeIdAndAttributeName.substring((nodeId + "_").length());
        //    }
        //}
        //return null;
        return key;
    }
}
